package com.lz.helper

import android.content.Context
import android.os.Build
import android.util.Log
import com.face.FaceRecognize

object HelperConfig {

    private var hasInit = false

    @JvmStatic
    fun init(context: Context) {
        if (!hasInit) {
            hasInit = FaceRecognize.getInstance().initModels(context.assets, context)
            Log.d("lzkeji", "initFace $hasInit")
        }
    }

    //板子类型, 新像素17 , 老像素 21  , 辽源通达串口16 , 辽源通达U口19
    @JvmStatic
    fun flatNum(): Int {
        return Build.getSerial().length
    }

    //是否为辽源通达板子
    @JvmStatic
    fun isLYTDFlat(): Boolean {
        val flatNum = flatNum()
        return flatNum == 16 || flatNum == 19
    }

}